// 不换行
no-wrap()
  text-overflow ellipsis
  overflow hidden
  white-space nowrap
  word-break: keep-all

/* 不换行 */

rowsNoWrap($rows)
  word-break break-all
  text-overflow ellipsis
  -webkit-box-orient vertical
  -webkit-line-clamp $rows
  display -webkit-box
  overflow hidden

// flex兼容
displayFlex()
  display -webkit-box
  display -webkit-flex
  display -ms-flexbox
  display flex

flex($num)
  -webkit-box-flex $num
  box-flex $num
  -webkit-flex $num
  flex $num

placeholder($fontSize, $color)
  &::-webkit-input-placeholder
    font-size $fontSize
    color $color
  &::-moz-placeholder
    font-size $fontSize
    color $color
  &::-moz-placeholder
    font-size $fontSize
    color $color
  &::-ms-input-placeholder
    font-size $fontSize
    color $color

transitionFunction($time)
  -webkit-transition: all $time
  -moz-transition: all $time
  -ms-transition: all $time
  -o-transition: all $time
  transition: all $time

/*缩放效果*/
transformScale($size)
  transform: scale($size);
  -webkit-transform: scale($size);
  -moz-transform: scale($size);
  -o-transform: scale($size);
  -ms-transform: scale($size);

bg-image($url, $ext = ".png")
  background-image: url($url + "@2x" + $ext)
  @media (min-resolution: 3dppx)
    background-image: url($url + "@3x" + $ext)

/*设置渐变色*/
gradient()
  background: -webkit-linear-gradient(47deg, #3684F0, #0EAEFD) /* Safari 5.1 - 6.0 */

/*flex垂直居中*/
displayVerticalCenter($val)
  -webkit-align-items $val
  -moz-align-items $val
  -ms-align-items $val
  align-items $val

/*flex水平对齐方式*/
levelAlign($val)
  -webkit-justify-content $val
  -moz-justify-content $val
  -ms-justify-content $val
  justify-content $val
